﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DongDong.Common;
public partial class GRZX_WSXY_Default : Base
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Client objClient = Client.GetCurrent();
            SetMeta();
            if (objClient == null)
                return;
            litUserName.Text = objClient.Username;
            List<ZNXX> listZNXX = ZNXX.GetAllByConditon(0, objClient.ID, "", "", 0, "", (int)ZNXX.ZXXXType.前台);
            litMessCount.Text = listZNXX.Count.ToString();

            List<TouShu> listTouShu = TouShu.GetAllByConditon(0, 0, 0, "", "", objClient.ID, "");
            litWDTS.Text = listTouShu.Count.ToString();

            List<WGXX> listWGXX = WGXX.GetAllByConditon(0, 0, "", "", (int)WGXX.typeUserWG.普通用户, objClient.ID, 0);
            litWGXX.Text = listWGXX.Count.ToString();

            string AccountLeve = Enum.GetName(typeof(Client.safeLevel), objClient.SafeLevel);
            litAccountLevel.Text = AccountLeve + "：";
            YHDR_CDSX_KJDH objYHDR_CDSX_KJDH = YHDR_CDSX_KJDH.GetByAddUserID(objClient.ID);
            litLastLoginTime.Text = objYHDR_CDSX_KJDH.LastLoginTime.ToString();

            litJF.Text = objClient.TotalJiFen.ToString();

            ZHJBXX objZHJBXX = ZHJBXX.GetByAddUserID(objClient.ID);
            lblAccountNo.Text = objZHJBXX.AccountNo;
            if (!string.IsNullOrEmpty(objClient.NiCheng))
                imgTX.ImageUrl = "~/Resource/TouXiang/" + objClient.NiCheng;

            rptAdv.DataSource = Adv.GetAllByConditon((int)Adv.GRZX.常用入口, "");
            rptAdv.DataBind();

            HelpNava objHelpNava = HelpNava.GetByTitle("学员帮助指南");
            rptHelpNava.DataSource = HelpDes.GetAllConditon(objHelpNava.ID, "");
            rptHelpNava.DataBind();
        }
    }
    public void SetMeta()
    {
        this.SetMeta("我是学员-求学网", "求学网_家教辅导_网上家教辅导_企业培训_个人培训_网上培训", "求学网是一个给您提供网上家教辅导的平台，方便您无论在哪里都能够学习到新的东西");

    }

}